#!/usr/bin/python
import sys
import logging

logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s - %(levelname)s - %(message)s',
                    datefmt='%Y-%m-%d %H:%M:%S',
                    filename='/training/CF/test.log',
                    filemode='w')
logging.info("map script started")

for line in sys.stdin:
    logging.info("data: %s", line)
    ss = line.strip().split(',')
    if len(ss) != 3:
        continue
    u, i, s = ss
    print("%s\t%s\t%s" % (i, u, s))

